package com.backend.demo1.config;

public class ApiException extends RuntimeException {
    private final ApiResponse<?> apiResponse;

    public ApiException(int code, String message) {
        super(message);
        this.apiResponse = ApiResponse.error(code, message);
    }

    public ApiResponse<?> getApiResponse() {
        return apiResponse;
    }
}